package com.splant.android.smart.UILevel;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.splant.android.R;
import com.splant.android.smart.SystemDefinedLevel.AutoUpdateSoft.SoftVersionManager;
import com.splant.android.smart.SystemDefinedLevel.Utils.System_Util;

/**
 * Created by Administrator on 2016/1/12.
 */
public class System_AboutSoft_Activity extends Activity implements View.OnClickListener {

    private ImageView img_goBack;
    private TextView curVersion_tv;
    private TextView chekcVersion_tv;
    private TextView tv_deviceVersion;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.system_aboutsoft_activity);
        curVersion_tv = (TextView) findViewById(R.id.curVersion_tv);
        chekcVersion_tv = (TextView) findViewById(R.id.checkNewVersion_tv);
        tv_deviceVersion = (TextView) findViewById(R.id.tv_deviceversion);
       // tv_deviceVersion.setText(GlobalConfig.deviceSoftVersion);

        curVersion_tv.setText(System_Util.getVersion(this));
        img_goBack = (ImageView) findViewById(R.id.img_goBack);

        TextView titleBarTxt = (TextView) this.findViewById(R.id.titleBarTxt);


        img_goBack.setOnClickListener(this);
        chekcVersion_tv.setOnClickListener(this);
    }

    private SoftVersionManager softVersionManager;

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.img_goBack:
                finish();
                overridePendingTransition(R.anim.slide_right_in, R.anim.slide_left_out);
                break;
            case R.id.checkNewVersion_tv:
                softVersionManager = new SoftVersionManager(this);
                softVersionManager.checkVersion(true);
                break;
        }
    }

}
